/** 
 *	@brief	Contains base class for all the factories
 *	@file	Factory.hpp contains base, abstract class for all the factories 
 *			for creating objects with implementations of interfaces.
 *	@author Szymon Janikowski
 */
#ifndef FACTORY_H
#define FACTORY_H



#include "InterfaceBase.hpp"

#include <string>

namespace pluglib
{
	using namespace std;
	/**
	*		@brief base, abstract class for all the factories 
	*		@note Used for creating objects with implementations of interfaces.
	*/
	class Factory
	{
	public:
		/// @brief Method returning name of the factory
		/// @note Every factory is identified by name and kept in one of FactoriesServer.
		virtual string getName() = 0;

		/// @brief Generalized base method for creating objects 
		/// @note It returns pointer to InterfaceBase class - needs dynamic_casting, but enables sychronization
		virtual InterfaceBase* create() = 0;

		/// @brief Method returning the name of the FactoriesServer used to keep such factory
		/// @note Every server is identified by name and kept in the Engine singleton
		virtual string getServerName() = 0;
	};
};
#endif
